import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
export type BannerResult = {
  page: number;
  pagesize: number;
  success: boolean;
  code: number;
  token: string;
  msg: string;
  data: {
    data: any[];
    total: number;
    page: number;
    pagesize: number;
  };
};
/** 贷款列表列表*/
export const getAdminManageList = (data?: object) => {
  return http.request<BannerResult>("get", baseUrlApi(`admin/manage/list?company_name=${data.company_name}&legal_name=${data.legal_name}&admin_nick=${data.admin_nick}&pagesize=${data.pagesize}&page=${data.page}`), {
    data
  });
};
//贷款列表
export const getAdminManageListInfo= (data?: object) => {
  return http.request<BannerResult>("get", baseUrlApi(`admin/manage/list?company_name&legal_name&admin_nick&pagesize=${data.pagesize}&page=${data.page}`), {
    data
  });
};
// 贷款添加
export const manageInsert= (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi(`admin/manage/insert`), {
    data
  });
};
// 贷款修改
export const manageUpdate= (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi(`admin/manage/update`), {
    data
  });
};
